package cn.edu.neusoft.myappos.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

import cn.edu.neusoft.myappos.R;


public class CourseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.course_activity);
        init();
    }

    private void init() {
        ImageView imageView;
        TextView foodname,shopname,intro,tel,price;
        imageView=findViewById(R.id.imageView2);
        foodname=findViewById(R.id.vfoodname);
        shopname=findViewById(R.id.vshopname);
        intro=findViewById(R.id.vfoodintro);
        tel=findViewById(R.id.vtel);
        price=findViewById(R.id.vprice);

        Intent intent= getIntent();
        int vimg=intent.getIntExtra("img",R.drawable.f2);
        String vfoodN=intent.getStringExtra("foodname");
        String vshopN=intent.getStringExtra("shopname");
        String vintro=intent.getStringExtra("foodintro");
        String vtel=intent.getStringExtra("tel");
        String vprice=intent.getStringExtra("price");

        imageView.setImageResource(vimg);
        foodname.setText(vfoodN);
        shopname.setText(vshopN);
        intro.setText(vintro);
        tel.setText(vtel);
        price.setText(vprice);

    }


}
